load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "syntheticprivilege",
    srcs = [
        "constants.go",
        "external_connection_privilege.go",
        "global_privilege.go",
        "synthetic_privilege_registry.go",
        "vtable_privilege.go",
    ],
    importpath = "github.com/cockroachdb/cockroach/pkg/sql/syntheticprivilege",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/security/username",
        "//pkg/sql/catalog/catpb",
        "//pkg/sql/catalog/descpb",
        "//pkg/sql/opt/cat",
        "//pkg/sql/privilege",
        "//pkg/sql/sem/catconstants",
        "//pkg/sql/sem/catid",
        "//pkg/sql/sem/tree",
        "@com_github_cockroachdb_errors//:errors",
    ],
)

go_test(
    name = "syntheticprivilege_test",
    srcs = ["synthetic_privilege_registry_test.go"],
    embed = [":syntheticprivilege"],
    deps = ["@com_github_stretchr_testify//require"],
)
